<?/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
?>
<form method="post" action="/servergroup/query_servergroup.php" name="bdform" id="bdform">

<table border="0" cellpadding="5" cellspacing="1" width="1000">
<tr valign="top">
<td>

<table border="0" cellpadding="5" cellspacing="1" width="500" class="formtable">
<tr valign="top">
	<td class="formfielddesc">ServerGroup Name:<br />
		<span class="required">{required}</span></td>
	<td class="formfield">
		<input type="text" value="<?=$serverGroupInfo["groupname"];?>" name="groupname" class="textfield" />
	</td>
</tr>
<tr valign="top">
	<td class="formfielddesc">Monitoring INI:<br />
		<span class="required">{required}</span></td>
	<td class="formfield">
		<select name="iniID" size="1" class="selectfield">
	<?
	
	$aIniFiles = $BigDaddyData->GetIniFiles();
	
	if (is_array($aIniFiles))
	{
		foreach ($aIniFiles as $nIndex => $row)
		{
			if ($serverGroupInfo["iniID"]==$row["ID"])
			{
				$s=" selected";
			}
			else
			{
				$s="";
			}
			?>
			<option value="<?=$row["ID"];?>"<?=$s;?>><?=$row["name"];?></option>
			<?
		}
	}
	?>
	</select>
	</td>
</tr>
<tr valign="top">
	<td class="formfielddesc">Percent Fail Threshold (1-99)<br />
		</td>
	<td class="formfield">
		<input type="text" value="<?=$serverGroupInfo["mon_percentthreshold"];?>" name="mon_percentthreshold" class="textfield" />
	</td>
</tr>
<tr valign="top">
	<td class="formfielddesc">Number Fail Threshold (>0)<br />
		</td>
	<td class="formfield">
		<input type="text" value="<?=$serverGroupInfo["mon_numberthreshold"];?>" name="mon_numberthreshold" class="textfield" />
	</td>
</tr>
<tr>
	<td class="formfielddesc">Start Level</td>
	<td class="formfield">
	<select name="mon_startlevel" size="1" class="selectfield">
	<?
	for ($i=1; $i<6; $i++)
	{
		if ($i==$serverGroupInfo["mon_startlevel"])
		{
			$s=" selected";
		}
		else
		{
			$s="";
		}
	?>
	<option value="<?=$i;?>"<?=$s;?>><?=$i;?></option>
	<?
	}
	?>
	</select>
	
	</td>
	</tr>
	<tr>
	<td class="formfielddesc">End Level</td>
	<td class="formfield">
	<select name="mon_endlevel" size="1" class="selectfield">
	<option value="0">All Levels</option>
	<?
	for ($i=1; $i<6; $i++)
	{
		if ($i==$serverGroupInfo["mon_endlevel"])
		{
			$s=" selected";
		}
		else
		{
			$s="";
		}
	?>
	<option value="<?=$i;?>"<?=$s;?>><?=$i;?></option>
	<?
	}
	?>
	</select>
	
	</td>
	</tr>

</table>

</td>
</tr>

<tr valign="top">
	
	<td class="formfielddesc" colspan="2">
	Notes:
	</td>
</tr>

<tr valign="top">
	
	<td class="formfield" colspan="2">
	<style>
	
	.textareafield
	{
		width: 800;
		height: 200;
	}
	</style>
	
		<textarea name="notes" class="textareafield" wrap="virtual"><?=$serverGroupInfo["notes"];?></textarea>
	
	</td>
</tr>



<tr valign="top">
	<td class="formfielddesc" colspan="2">
	<div align="center"><?
	if ($type=="addnew")
	{
	?>
		<input type="hidden" name="action" value="addservergroup" />
	<?
	}
	
	if ($type=="edit")
	{
	?>
		<input type="hidden" name="action" value="editservergroup" />
		<input type="hidden" name="serverGroupID" value="<?=$_REQUEST["serverGroupID"];?>" />
	<?
	}
	?></div>
	
	</td>
</tr>
</table>

<br />



</form>
